package cxf.server;

import org.apache.cxf.jaxws.JaxWsServerFactoryBean;

public class Test {
    public static void main(String[] args) {
        JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
        // 设置服务端地址
        serverFactoryBean.setAddress("http://127.0.0.1:9999/cxf");
        // 设置服务接口
        serverFactoryBean.setServiceClass(CxfServer.class);
        // 设置实现类对象
        serverFactoryBean.setServiceBean(new CxfServerImpl());
        // 发布服务
        serverFactoryBean.create();
        System.out.println("发布成功");

    }
}
